<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8" />
    <title>使用jsx创建虚拟dom</title>
    <!-- 引入react核心库 -->
    <script src="https://unpkg.com/react@18/umd/react.development.js"></script>
    <script src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script>
    <!-- Don't use this in production: -->
    <script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
</head>

<body>
    <div id="root"></div>
    <script type="text/babel">
        //创建虚拟dom
        const vDom = (
            <h1 id='title'>
                <span>Hello, world!</span>
            </h1>
        )
        //渲染虚拟dom到页面
        ReactDOM.render(vDom, document.getElementById('root'))
    </script>
</body>

</html>